<?php

/**
 * Created with Sublime
 * Author: yinni
 * Date: 2017/11/09 14:42
 */
namespace App\Http\Controllers\Admin\History;

use Illuminate\Http\Request;
use App\Services\Admin\HistoryService;
use App\Http\Controllers\Controller;
use App\Http\Requests\Admin\UserRequest;
use \App\Http\Controllers\Admin\BaseController;

/**
 * 历史查询
 * Class SystemexpController
 * @package App\Http\Controllers\Admin\Location 
 */
class HistoryController extends BaseController
{
    protected $service;
	public function __construct(HistoryService $service)
    {
        parent::__construct();
        $this->service = $service;
    }

    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $result = $this->service->index();
        return request()->ajax() ? $result : view('themes.admin.history.index')->with($result);
    }    
}